"""
setattr方法为实例p1增加属性（变量）
"""
from Lab01 import Point


p1 = Point(4, 5)
setattr(p1, 'z', 6)  # 在实例p1中插入变量'z'=6
print('Point dict is {}'.format(Point.__dict__))
print('p1 dict is {}'.format(p1.__dict__))